package com.isoftstone.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.isoftstone.dao.InstitutionDAO;
import com.isoftstone.pojo.Institution;
import com.isoftstone.service.InstitutionService;

@Service
public class InstitutionServiceImpl implements InstitutionService {
	
	@Autowired
	private InstitutionDAO institutionDAO;

	@Override
	public int Update(Institution institution) {
		return institutionDAO.update(institution);
	}

	@Override
	public List<Institution> getALLInstitution() {
		
		return institutionDAO.selectAll();
	}

	@Override
	public int cancellation(int id) {
		return institutionDAO.delete(id);
	}

	@Override
	public int insert(Institution institution) {
		return institutionDAO.insert(institution);
	}

	@Override
	public Institution select(int id) {
		return institutionDAO.select(id);
	}

}
